Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632707 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game

font/ cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game/font/
1 Items
  • sans.ttf
  • assets/ cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game/assets/
    1 Items
  • favicon.png
  • style.css cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game/style.css
    104 Views
    0 Comments
    * {
    padding: 0;
    margin: 0;
    }

    body {
    overflow: hidden;
    background: #19172e;
    index.html cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game/index.html
    305 Views
    0 Comments
    <!DOCTYPE html>
    <html lang="en">

    <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    script.js cody/swapnilsparsh/30DaysOfJavaScript/38 - Snake-Game/script.js
    117 Views
    0 Comments
    let inputDir = { x: 0, y: 0 };
    let speed = 5;
    let lastPaintTime = 0;
    let snakeArr = [{ x: 13, y: 15 }]
    food = { x: 6, y: 7 };
    let score = 0;
    // Game Functions
    function main(ctime) {